package net.suncaper.demo;


import net.suncaper.demo.domain.Shopcart;
import net.suncaper.demo.mapper.ProductMapper;
import net.suncaper.demo.mapper.ShopcartMapper;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class testmapper {
    @Autowired
    private ProductMapper productMapper;
    @Autowired
    private ShopcartMapper shopcartMapper;
    @Test
    public void testL(){
        int count=productMapper.evaluateSum(21);
        Assert.assertEquals(1,count);
    }
//    @Test
//    public void testImage(){
//        Shopcart shopcart=shopcartMapper.shopcartImage(22);
//        Assert.assertEquals(java.util.Optional.of(2),shopcart.getShopcartId());
//    }
}